<?php
require_once "../../../libs/ttServer.php";

$tt = new ttServer();

//define('securePOST', 'secureGET');

if ($tt->session->is_login())
{

	$from_uid = $tt->session->user['uid'];
	$to_uid = secureGET("uid");
	$title = secureGET("title");
	$content = secureGET("content");

	
	if (!is_numeric($to_uid))
	{
		echo FormatAPIOutput($tt->please_check_parameters());
	}
	else
	{
		echo FormatAPIOutput($tt->mail_send($from_uid, $to_uid,  $title, $content));
	}
}
else
{
	echo FormatAPIOutput($tt->session->please_login());
}


?>